using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace RiceShop.Models
{
    [Table("SysAdmin")]
    public class Admin
    {
        [Key]
        [Column("adminId")]
        public long adminId { get; set; }

        [Required]
        [Column("adminName")]
        [StringLength(20)]
        public string adminName { get; set; } = string.Empty;

        [Column("adminNickName")]
        [StringLength(20)]
        public string? adminNickName { get; set; }

        [Column("adminPassword")]
        [StringLength(255)]
        public string adminPassword { get; set; } = string.Empty;

        [Column("adminEmail")]
        [StringLength(30)]
        [EmailAddress]
        public string? adminEmail { get; set; }

        [Column("adminPhone")]
        [StringLength(20)]
        public string? adminPhone { get; set; }

        [Column("adminCtime")]
        public DateTime? adminCtime { get; set; }

        [Column("adminUtime")]
        public DateTime? adminUtime { get; set; }

        [Column("adminStatus")]
        public byte? adminStatus { get; set; }

        [Column("adminType")]
        public byte? adminType { get; set; }

        [Column("adminIp")]
        [StringLength(20)]
        public string? adminIp { get; set; }
    }
}
